// 文件路径: src/components/CustomTreeOption.js

import TreeItem from '@mui/lab/TreeItem';
import TreeView from '@mui/lab/TreeView';
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
import ChevronRightIcon from '@mui/icons-material/ChevronRight';

// 自定义树状结构的列表项
const CustomTreeOption = ({ label, children }) => (
  <TreeView defaultCollapseIcon={<ExpandMoreIcon />} defaultExpandIcon={<ChevronRightIcon />}>
    <TreeItem nodeId="1" label={label}>
      {children}
    </TreeItem>
  </TreeView>
);

export default CustomTreeOption;
